# 创建一个学生薄，添加学生信息添加到列表中，并遍历学生信息
# class Students () :
#     lst = []
#     def __init__ (self, **para) :
#         pass
#     def stuList (self) :
#         print('姓名\t\t年龄\t\t地址\t\t年级\t\t学号')
#         for item in self.lst :
#             for key, item in item.items() :
#                 print(item,'\t' ,end="")
#             print()
#
#     def addStu(self, **para):
#         self.lst.append(para)
#         print(self.lst)
# stu = Students()
# stu.addStu(**{"name":'张三', 'age':'12', 'address':'河庄中学','nj':'初二','number':'45'})
# stu.addStu(**{"name":'李四', 'age':'22', 'address':'河庄中学','nj':'初一','number':'25'})
# stu.addStu(**{"name":'王五', 'age':'42', 'address':'河庄中学','nj':'初二','number':'35'})
# stu.addStu(**{"name":'刘六', 'age':'52', 'address':'河庄中学','nj':'初三','number':'65'})
# stu.stuList ()



class Student :
    def __init__(self, name, age) :
        self.name = name
        self.age = age

    def show(self):
        print(f'姓名；{self.name}, 今年：{self.age}岁')

stu1 = Student('张三', 20)
stu2 = Student('李四', 24)
stu3 = Student('王五', 44)

lst = [stu1, stu2, stu3]

for item in lst :
    item.show()

